#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project : gtmsAutoTestProject 
@File    : member_info_interface.py
@IDE     : PyCharm 
@Author  : Mario
@Date    : 2022/7/23 10:36 
@Describe: 会员信息
"""
from fastapi import APIRouter
from Comm.logUtils.logControl import LogHandler
from FastApi.dto.middle.member.member_info_dto import MemberInfoDto
from FastApi.server.middle.member.member_info_server import get_customer_info

logger = LogHandler().get_logger()
memberInfo_router = APIRouter()


@memberInfo_router.post("/info", name="获取会员信息")
async def memberInfo(payload: MemberInfoDto):
    logger.info('请求参数:[{}]'.format(payload))
    response_data = get_customer_info(payload.brandCode, payload.environment, payload.mobile)
    logger.info('接口响应:[{}]'.format(response_data))
    return response_data
